﻿@model CarsManagement.Models.infos

@{
    ViewBag.Title = "Edit";
}
<h2>编辑</h2>
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

<div class="form-horizontal">

    <hr />
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    @Html.HiddenFor(model => model.Id)

    <div class="form-group">
        @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Phonenum, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Phonenum, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Phonenum, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Number, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Number, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Number, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.licence, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.licence, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.licence, "", new { @class = "text-danger" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(model => model.Addresss, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            <select name="Addresss" class="control-label col-md-2">
                <option value="A区">A区</option>
                <option value="B区">B区</option>
                <option value="C区">C区</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(model => model.States, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            <select name="States" class="control-label col-md-2">
                <option value="在库">在库</option>
                <option value="出库">出库</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.TypeId, "车辆类型", htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownList("TypeId", null, htmlAttributes: new { @class = "form-control" })
            @Html.ValidationMessageFor(model => model.TypeId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="保存" class="btn btn-default" />
        </div>
    </div>
</div>
}

<div>
    @Html.ActionLink("返回列表", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

